<template>
  <div id="basicLayout">
    <a-config-provider
      :theme="{
      token: {
        colorPrimary: '#FF8E53',
      },
    }"
    >
      <a-layout style="min-height: 100vh">
        <a-layout-header v-if="isVisible"  class="header"><GlobalHeader /></a-layout-header>
        <a-layout>
          <GlobalSider class="sider" />
          <a-layout-content class="content">
            <router-view />
          </a-layout-content>
        </a-layout>
        <a-layout-footer v-if="isVisible" class="footer"
        >Life is a box of chocolates, you never know what you're gonna get.</a-layout-footer
        >
      </a-layout>
    </a-config-provider>
  </div>
</template>

<script setup lang="ts">
import GlobalHeader from '@/components/GlobalHeader.vue'
import {computed} from "vue";
import {useRoute} from "vue-router";
import GlobalSider from "@/components/GlobalSider.vue";


const route = useRoute()

const isVisible = computed(() => {

  return route.path !== '/not_found'
})

</script>

<style scoped>
#basicLayout .header {
  padding-inline: 20px;
  background: white;
  color: unset;
  margin-bottom: 1px;
}

#basicLayout .sider {
  background: #fff;
  border-right: 0.5px solid #eee;
  padding-top: 20px;
}

#basicLayout :deep(.ant-menu-root) {
  border-bottom: none !important;
  border-inline-end: none !important;
}

#basicLayout .content {
  padding: 28px;
  background: linear-gradient(to right, #fefefe, #fff);
  margin-bottom: 28px;
}

#basicLayout .footer {
  background: #efefef;
  padding: 16px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
}

</style>
